package com;

import com.行为型模型.U访问者模式.Dog;

import java.util.ArrayList;
import java.util.List;

public class Test {

    public static void main(String[] args) {
        List<Dog> list=new ArrayList();

        list.add(new Dog());
        list.add(new Dog());


        Dog[] objects = list.toArray(new Dog[0]);
        for (int i = 0; i <objects.length ; i++) {
            System.out.println(objects[i]);
        }


    }
}
